package cn.kkcxy.blog.system.service.article;

import cn.kkcxy.blog.core.entity.article.ArticleCategory;
import cn.kkcxy.blog.core.vo.client.archive.category.ClientCommonArticleCategoryVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author kk
* @description 针对表【article_category】的数据库操作Service
* @createDate 2024-09-18 00:25:54
*/
public interface ArticleCategoryService extends IService<ArticleCategory> {

    /**
     * @description: [用户端] 获取文章分类数据
     * @author: kkcxy
     * @date: 2024/9/27 1:38
     * @param: []
     * @return: java.util.List<cn.kkcxy.blog.core.vo.client.archive.category.ClientSecondLevelArticleCategoryVO>
     **/
    List<ClientCommonArticleCategoryVO> getArticleCategories(Long parentId, Integer categoryType, Integer deleted);

    /**
     * @description: 根据一级分类ID获取该分类下所有子分类ID
     * @author: kkcxy
     * @date: 2024/9/27 22:58
     * @param: [primaryCategoryId]
     * @return: java.util.List<java.lang.Long>
     **/
    List<Long> getSecondLevelCategoryIdsByPrimaryCategoryId(Long primaryCategoryId);

    /**
     * @description: 根据分类id获取文章分类下文章数
     * @author: kkcxy
     * @date: 2024/9/27 23:32
     * @param: [ids]
     * @return: java.util.List<cn.kkcxy.blog.core.vo.client.archive.category.ClientCommonArticleCategoryVO>
     **/
    List<ClientCommonArticleCategoryVO> getArticleCategoryCountListByCategoryIds(List<Long> ids);

    /**
     * @description: 获得分类总数
     * @author: kkcxy
     * @date: 2024/9/28 23:59
     * @param: []
     * @return: java.lang.Integer
     **/
    Integer getCategoryCount();
}
